package com.bw.entity.order;

import java.math.BigDecimal;
import java.util.Date;
import java.io.Serializable;


import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 
 * </p>
 *
 * @author yzz
 * @since 2020-06-20
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("pi_order")
public class PiOrder extends Model<PiOrder> {

    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 订单编号
     */
    private String code;

    /**
     * 客户id
     */
    @TableField("customerId")
    private Long customerId;

    /**
     * 客户名称
     */
    @TableField("customerName")
    private String customerName;

    /**
     * 联系人id
     */
    @TableField("linkmanId")
    private Long linkmanId;

    /**
     * 主键
     */
    @TableField("userid")
    private Long userid;

    /**
     * 联系人姓名
     */
    @TableField("linkmanName")
    private String linkmanName;

    /**
     * 联系人电话
     */
    @TableField("linkmanTel")
    private String linkmanTel;

    /**
     * 税率
     */
    @TableField("taxRate")
    private BigDecimal taxRate;

    /**
     * 价格（不含税）
     */
    @TableField("price")
    private BigDecimal price;

    /**
     * 价格（含税）
     */
    @TableField("priceIt")
    private BigDecimal priceIt;

    /**
     * 工艺员Id
     */
    @TableField("technicianId")
    private Long technicianId;

    /**
     * 工艺时间
     */
    @TableField("technologyDate")
    private Date technologyDate;

    /**
     * 创建时间
     */
    @TableField("createDate")
    private Date createDate;
    @TableField(exist = false)
    private Date min;
    @TableField(exist = false)
    private Date max;

    /**
     * 更新人
     */
    @TableField("updateUser")
    private Long updateUser;

    /**
     * 更新时间
     */
    @TableField("updateDate")
    private Date updateDate;
    /**
     * 状态（0未提交，1已提交，2已工艺，3已报价，4已转合同）
     */
    private Integer state;

    /**
     * 删除标识（0未删除，1已删除）
     */
    @TableField("isDelete")
    private Integer isDelete;

    @TableField(exist = false)
    private Integer omouth;
    @TableField(exist = false)
    private Integer oday;
    @TableField(exist = false)
    private BigDecimal osum;
    @TableField(exist = false)
    private Integer onum;

    //最后总价
    private BigDecimal Priceit;//所有零件的总和（税后）

    public BigDecimal getPriceit() {
        return Priceit;
    }

    public void setPriceit(BigDecimal priceit) {
        Priceit = priceit;
    }

    public void setMin(Date min) {
        this.min = min;
    }

    public void setMax(Date max) {
        this.max = max;
    }

    public Integer getOmouth() {
        return omouth;
    }

    public void setOmouth(Integer omouth) {
        this.omouth = omouth;
    }

    public Integer getOday() {
        return oday;
    }

    public void setOday(Integer oday) {
        this.oday = oday;
    }

    public BigDecimal getOsum() {
        return osum;
    }

    public void setOsum(BigDecimal osum) {
        this.osum = osum;
    }

    public Integer getOnum() {
        return onum;
    }

    public void setOnum(Integer onum) {
        this.onum = onum;
    }

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

    public static long getSerialVersionUID() {
        return serialVersionUID;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public Long getCustomerId() {
        return customerId;
    }

    public void setCustomerId(Long customerId) {
        this.customerId = customerId;
    }

    public String getCustomerName() {
        return customerName;
    }

    public void setCustomerName(String customerName) {
        this.customerName = customerName;
    }

    public Long getLinkmanId() {
        return linkmanId;
    }

    public void setLinkmanId(Long linkmanId) {
        this.linkmanId = linkmanId;
    }

    public Long getUserid() {
        return userid;
    }

    public void setUserid(Long userid) {
        this.userid = userid;
    }

    public String getLinkmanName() {
        return linkmanName;
    }

    public void setLinkmanName(String linkmanName) {
        this.linkmanName = linkmanName;
    }

    public String getLinkmanTel() {
        return linkmanTel;
    }

    public void setLinkmanTel(String linkmanTel) {
        this.linkmanTel = linkmanTel;
    }

    public BigDecimal getTaxRate() {
        return taxRate;
    }

    public void setTaxRate(BigDecimal taxRate) {
        this.taxRate = taxRate;
    }

    public BigDecimal getPrice() {
        return price;
    }

    public void setPrice(BigDecimal price) {
        this.price = price;
    }

    public BigDecimal getPriceIt() {
        return priceIt;
    }

    public void setPriceIt(BigDecimal priceIt) {
        this.priceIt = priceIt;
    }

    public Long getTechnicianId() {
        return technicianId;
    }

    public void setTechnicianId(Long technicianId) {
        this.technicianId = technicianId;
    }

    public Date getTechnologyDate() {
        return technologyDate;
    }

    public void setTechnologyDate(Date technologyDate) {
        this.technologyDate = technologyDate;
    }

    public Date getCreateDate() {
        return createDate;
    }

    public void setCreateDate(Date createDate) {
        this.createDate = createDate;
    }

    public Long getUpdateUser() {
        return updateUser;
    }

    public void setUpdateUser(Long updateUser) {
        this.updateUser = updateUser;
    }

    public Date getUpdateDate() {
        return updateDate;
    }

    public void setUpdateDate(Date updateDate) {
        this.updateDate = updateDate;
    }

    public Integer getState() {
        return state;
    }

    public void setState(Integer state) {
        this.state = state;
    }

    public Integer getIsDelete() {
        return isDelete;
    }

    public void setIsDelete(Integer isDelete) {
        this.isDelete = isDelete;
    }

    public Date getMin() {
        return min;
    }

    public Date getMax() {
        return max;
    }
}
